<% 
Dim tabSelected
tabSelected = "candidates"Dim titletitle="Search for Jobs with Adecco"Dim meta_descmeta_desc="Searching for the right job? Check out Adecco's list of job opportunities in Singapore, including part time contract and permanent jobs"Dim meta_keysmeta_keys=""dim breadcrumbreadcrum="<a href='index.asp'> Home </a> > <a href='candidates.asp'> Candidates </a> ><a href='candidates_jobs.asp'> Jobs </a> > <span class='active'> Search Engine  </span>"
%>
<!--#include file="inc/header.asp" -->
<!--#include file="candidates_leftmenu.asp" -->
<div class="threeCols">
    <br />
    <h1>
        Search Engine</h1>
    <!--<img src="asset/pictures/hero2.jpg"><br />-->	<div class="textContainer">		<p>Searching for the right job? Check out Adecco's list of <a class="inLineLink" href="candidates_allJobs.asp">job opportunities in Singapore</a> , including part time contract and permanent jobs.</p>	</div>
    <div class="B01_jobSearch">

        <script type="text/javascript">
            function saveCookie()
            {
                var eleAdvSearch = document.getElementById("divAdvSearch");
                if (eleAdvSearch != null)
                {
                    setCookie("advSearchJobTitle", document.getElementById("tbJobTitle").value , 1);
                    setCookie("advSearchJobCode", document.getElementById("tbJobCode").value , 1);
                    setCookie("advSearchVisible", ((eleAdvSearch.style.display == "block") ? "yes" : "no") , 1);
                    setCookie("advSearchJobCat", document.getElementById("ddlJobCat").selectedIndex , 1);
                    setCookie("advSearchWorkLoc", document.getElementById("ddlWorkLocation").selectedIndex , 1);
                    setCookie("advSearchEmpNat", document.getElementById("ddlEmployNature").selectedIndex , 1);
                }
            }
            
            function toggleAdvSearch()
            {
                var eleAdvSearch = document.getElementById("divAdvSearch");
                var lnkAdvSearch = document.getElementById("lnkAdvSearch");
                
                if (document.getElementById("divAdvSearch") != null)
                {
                    if (eleAdvSearch.style.display=="none")
                    {
                        //setCookie("advSearchVisible", "yes", 1);
                        eleAdvSearch.style.display="block";
                        lnkAdvSearch.innerText = "Basic Search";
                    }
                    else
                    {
                        //setCookie("advSearchVisible", "no", 1);
                        eleAdvSearch.style.display="none";
                        lnkAdvSearch.innerText = "Advance Search";
                    }
                    //alert(getCookie("advSearchVisible"));
                }
            }
        </script>

        <form action="candidates_searchresults.asp" method="get" onsubmit="javascript:saveCookie();return true;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
                        <img src="asset/images/jobSearchBgTop560.png"></td>
                </tr>
                <tr>
                    <td>
                        <div class="textContainer">
                            <h3>
                                Quick Search</h3>
                            <div style="color: #FFFFFF;">
                                <p>
                                    Job Title<br />
                                    <input name="tbJobTitle" id="tbJobTitle" type="text" tabindex="0" value="" size="85" /></p>
                                <p>
                                    Job Code<br />
                                    <input type="text" tabindex="0" value="" size="85" name="tbJobCode" id="tbJobCode" /></p>
                                <br />
                                <div class="content">
                                    <a href="javascript:toggleAdvSearch()" id="lnkAdvSearch" style="color: #FFFFFF;">Advance
                                        Search</a></div>
                                <div id="divAdvSearch" style="display: none;">
                                    <hr style="color: #D5D3D0; height: 1px;" />
                                    <br />
                                    <p>
                                        Job Category<br />
                                        <!-- #INCLUDE FILE="inc/initDb.inc" -->
                                        <%
                                        SqlConn.Open
                                        set cmd = server.CreateObject("ADODB.Command")
                                        cmd.ActiveConnection = SqlConn
                                        cmd.CommandText = "SELECT CAT_CODE, CAT_DESC FROM JOB_ADVERT_CATEGORY WHERE ACTIVE=1"
                                        set rs = cmd.Execute 
                                        %>
                                        <select name="ddlJobCat" id="ddlJobCat" style="width: 270px;">
                                            <option value="">Please Select</option>
                                            <%do while not rs.EOF%>
                                            <option value="<%=trim(rs(0)) %>">
                                                <%=rs(1) %>
                                            </option>
                                            <% rs.MoveNext:loop%>
                                        </select>
                                        <%SqlConn.Close %>
                                    </p>
                                    <p>
                                        Employment Nature<br />
                                        <select name="ddlEmployNature" id="ddlEmployNature" style="width: 150px;">
                                            <option value="">Please Select</option>
                                            <option value="Contract">Contract</option>
                                            <option value="Permanent">Permanent</option>
                                            <option value="Temporary">Temporary</option>
                                        </select>
                                    </p>
                                    <p>
                                        Job Location<br />
                                        <select name="ddlWorkLocation" id="ddlWorkLocation" style="width: 150px;">
                                            <option value="">Please Select</option>
                                            <option value="North">North</option>
                                            <option value="East">East</option>
                                            <option value="West">West</option>
                                            <option value="Central">Central</option>
                                        </select>
                                    </p>
                                </div>
                                <div align="right">
                                    <input type="image" src="asset/images/btnSearch.png" alt="Search" onmouseout="this.src='asset/images/btnSearch.png'"
                                        onmouseover="this.src='asset/images/btnSearch_roll.png'" title="Search" />
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <img src="asset/images/jobSearchBgBottom560.png" /></td>
                </tr>
            </table>
        </form>
    </div>
    <div class="textContainer content">
        <a href="candidates_allJobs.asp">View all jobs</a>
    </div>
</div>

<script type="text/javascript">
    openMenu("subMenu_Jobs");       //this will open the Job's menu
    
    var val 
    
    val = getCookie("advSearchVisible");
    if (val != null && val != "")
    {
        if (val == "yes")
        {   
            document.getElementById("divAdvSearch").style.display="block";
            document.getElementById("lnkAdvSearch").innerText = "Basic Search";
        }
        else
        {
            document.getElementById("divAdvSearch").style.display="none";
            document.getElementById("lnkAdvSearch").innerText = "Advance Search";
        }
    }
    
    val = getCookie("advSearchJobCat");
    document.getElementById("ddlJobCat").selectedIndex = ((val != null && val != "") ? val : -1);
    
    val = getCookie("advSearchWorkLoc");
    document.getElementById("ddlWorkLocation").selectedIndex = ((val != null && val != "") ? val : -1);
    
    val = getCookie("advSearchJobTitle");
    document.getElementById("tbJobTitle").value = ((val != null && val != "") ? val : "");
    
    val = getCookie("advSearchJobCode");
    document.getElementById("tbJobCode").value = ((val != null && val != "") ? val : "");

</script>

<!--#include file="inc/footer.asp" -->
